package com.xiaoy.web;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;

import com.xiaoy.util.page.PageInfo;



@Namespace("/workspace")
@Results( {
	/*@Result(name = "reload", location = "systemexception.do", type = "redirect") ,*/
	/*@Result(name = "list", location = "/WEB-INF/content/systemexception-list.jsp", type = "dispatcher"),*/ 
	@Result(name = "error", location = "/WEB-INF/content/workspace/exception.jsp", type = "dispatcher"),
//	@Result(name = "index", location = "/jsp/index.jsp", type = "dispatcher"),
})
/*@ExceptionMappings( {  
    @ExceptionMapping(exception = "com.ekingwin.bas.bas.exception.SystemException", result = "error") })*/
public class IndexAction extends BasicAction{
	
	private static final Log logger = LogFactory.getLog(IndexAction.class);
	
//	private String theme = "helios" ; 
//	private String ctx = request.getContextPath();
	
	public String index() throws Exception {
		System.out.println("aaaaaa");
		PageInfo pageInfo = new PageInfo();
		System.out.println("ssssss");
		pageInfo.setTitle("首页");
//		request.setAttribute("pageInfo", pageInfo);
		System.out.println("dddddd");
//		String username = getParameter(Templatekeys.USERNAME);
//		setLoginUser(username);
		return "index";
	}
	@Override
	public String execute() throws Exception {
		System.out.println("ccccc");
//		request.setAttribute("ctx", ctx);
//		request.setAttribute("theme", theme);
		return "index";
	}
//	public String getTheme() {
//		return theme;
//	}
//	public void setTheme(String theme) {
//		this.theme = theme;
//	}
//	public String getCtx() {
//		return ctx;
//	}
//	public void setCtx(String ctx) {
//		this.ctx = ctx;
//	}
	
}
